Integrand size = 27, antiderivative size = 151 \[ \int \cos (c+d x) (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=-\frac {A b^2 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2-n}{2},\frac {4-n}{2},\cos ^2(c+d x)\right ) (b \sec (c+d x))^{-2+n} \sin (c+d x)}{d (2-n) \sqrt {\sin ^2(c+d x)}}-\frac {b B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\cos ^2(c+d x)\right ) (b \sec (c+d x))^{-1+n} \sin (c+d x)}{d (1-n) \sqrt {\sin ^2(c+d x)}} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {16, 3872, 3857, 2722} \[ \int \cos (c+d x) (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=-\frac {A b^2 \sin (c+d x) (b \sec (c+d x))^{n-2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2-n}{2},\frac {4-n}{2},\cos ^2(c+d x)\right )}{d (2-n) \sqrt {\sin ^2(c+d x)}}-\frac {b B \sin (c+d x) (b \sec (c+d x))^{n-1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\cos ^2(c+d x)\right )}{d (1-n) \sqrt {\sin ^2(c+d x)}} \]
[In]
[Out]
Rule 16
Rule 2722
Rule 3857
Rule 3872
Rubi steps \begin{align*} \text {integral}& = b \int (b \sec (c+d x))^{-1+n} (A+B \sec (c+d x)) \, dx \\ & = (A b) \int (b \sec (c+d x))^{-1+n} \, dx+B \int (b \sec (c+d x))^n \, dx \\ & = \left (A b \left (\frac {\cos (c+d x)}{b}\right )^n (b \sec (c+d x))^n\right ) \int \left (\frac {\cos (c+d x)}{b}\right )^{1-n} \, dx+\left (B \left (\frac {\cos (c+d x)}{b}\right )^n (b \sec (c+d x))^n\right ) \int \left (\frac {\cos (c+d x)}{b}\right )^{-n} \, dx \\ & = -\frac {B \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (1-n) \sqrt {\sin ^2(c+d x)}}-\frac {A \cos ^2(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2-n}{2},\frac {4-n}{2},\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (2-n) \sqrt {\sin ^2(c+d x)}} \\ \end{align*}
Time = 0.13 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.71 \[ \int \cos (c+d x) (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\frac {\cot (c+d x) \left (A n \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1+n),\frac {1+n}{2},\sec ^2(c+d x)\right )+B (-1+n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n}{2},\frac {2+n}{2},\sec ^2(c+d x)\right )\right ) (b \sec (c+d x))^n \sqrt {-\tan ^2(c+d x)}}{d (-1+n) n} \]
[In]
[Out]
\[\int \cos \left (d x +c \right ) \left (b \sec \left (d x +c \right )\right )^{n} \left (A +B \sec \left (d x +c \right )\right )d x\]
[In]
[Out]
\[ \int \cos (c+d x) (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \cos \left (d x + c\right ) \,d x } \]
[In]
[Out]
\[ \int \cos (c+d x) (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int \left (b \sec {\left (c + d x \right )}\right )^{n} \left (A + B \sec {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \]
[In]
[Out]
\[ \int \cos (c+d x) (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \cos \left (d x + c\right ) \,d x } \]
[In]
[Out]
\[ \int \cos (c+d x) (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \cos \left (d x + c\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos (c+d x) (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int \cos \left (c+d\,x\right )\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \]
[In]
[Out]